<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript">
	$(function() {
		parent.$.messager.progress('close');

		$('#form').form({
			url : '/propertyCompanyController/edit',
			onSubmit : function() {
				parent.$.messager.progress({
					title : '提示',
					text : '数据处理中，请稍后....'
				});
				var isValid = $(this).form('validate');
				if (!isValid) {
					parent.$.messager.progress('close');
				}
				return isValid;
			},
			success : function(result) {
				parent.$.messager.progress('close');
				result = $.parseJSON(result);
				if (result.success) {
					parent.$.modalDialog.openner_dataGrid.datagrid('reload');
					parent.$.modalDialog.handler.dialog('close');
				}else {
					$.messager.alert("提示",result.msg, 'info');
				}
			}
		});
	});
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
	<div data-options="region:'center',border:false" title="" style="overflow: hidden;">
		<form id="form" method="post">
			<input name="id" type="hidden" class="span2" value="${company.id }" readonly="readonly"/>
			<table class="table table-hover table-condensed">
				<tr>
					<th>公司名字</th>
					<td><input name="name" type="text" placeholder="公司名称" class="easyui-validatebox span2" data-options="required:true" value="${company.name }"></td>
					<th>公司代码</th>
					<td><input name="code" type="text" placeholder="公司代码"  data-options="required:true" class="easyui-validatebox span2" value="${company.code }"></td>
				</tr>
				<tr>
					<th>公司负责人</th>
					<td><input name="contactPerson" type="text" placeholder="公司负责人" class=" span2" data-options="" value="${company.contactPerson }"></td>
					<th>手机号码</th>
					<td><input name="mobile" type="text" placeholder="手机号码"  data-options="" class="span2" value="${company.mobile }"></td>
				</tr>
				<tr>
					<th>座机号码</th>
					<td><input name="tel" type="text" placeholder="座机号码" class="span2" data-options="" value="${company.tel }"></td>
					<th>紧急联系人</th>
					<td><input name="casePerson" type="text" placeholder="紧急联系人"  data-options="" class="span2" value="${company.casePerson }"></td>
				</tr>
				<tr>
				<tr>
					<th>紧急联系人手机</th>
					<td colspan="3"><input name="casePersonMobile"  style="width:383px" type="text" placeholder="紧急联系人手机"  class="easyui-validatebox" data-options="validType:'mobile'" class="easyui-validatebox span2" value="${company.casePersonMobile }"></td>
				</tr>
				<tr>
					<td>公司地址</td>
					<td colspan="3" >
						<input name="address" style="width:383px"  type="text" placeholder="公司地址" class="easyui-validatebox" data-options="required:true,validType:'maxLength[400]'" value="${company.address }" />
					</td>
				</tr>
			</table>
		</form>
	</div>
</div>